<template>
  <div class="Personnel">
    <div class="title">服务管理-人才确认入职</div>
    <!--top-->
    <div>
      <div class="lPersonTop">
        <div class="btn-wrap">
          <el-form label-width="80px" inline v-if="cType == 3">
            <el-form-item label="入职时间">
              <el-date-picker
                value-format="yyyy-MM-dd"
                v-model="inTheTime"
                type="date"
                placeholder="请选择日期"
              ></el-date-picker>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="updateEntryTime" class="second-button">确认</el-button>
            </el-form-item>
          </el-form>
        </div>
        <!-- <div v-for=""> -->
        <div class="lPersonTop_box">
          <div>{{companyInfo.fullName}}</div>
          <div>{{companyInfo.contactName}}</div>
          <div>{{companyInfo.cphone}}</div>
          <div class="lPerson" @click="toCommunication(0)">
            <!-- <button>沟通</button> -->
            <img src="../../assets/imgs/duih.png">
          </div>
        </div>
        <div class="lPersonTop_box">
          <div>{{companyInfo.jobTitle}}</div>

          <div>
            <el-select v-model="jrrIds" @change="initData" size="mini">
              <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
            </el-select>
          </div>
          <div>{{ttphone[value]}}</div>
          <div class="lPerson" @click="toCommunication(1)">
            <!-- <button>沟通</button> -->
            <img src="../../assets/imgs/duih.png">
          </div>
        </div>
        <!-- </div> -->
      </div>
      <!-- <el-button>提交</el-button> -->
      <div class="flex-box flex-box-between shink0">
        <el-radio-group v-model="tabs">
          <el-radio-button class="top-radio-button" label="1">人才简历</el-radio-button>
          <el-radio-button label="2" v-if="from==1">推荐报告</el-radio-button>
        </el-radio-group>
        <!--人才意向单选-->
        <div class="inputIntertion" v-if="from==1">
          <h2>人才当前意向：</h2>
          <el-radio-group v-model="inputIntertion[value]">
            <el-radio :disabled="showType==1" :label="1">有</el-radio>
            <el-radio :disabled="showType==1" :label="2">无</el-radio>
          </el-radio-group>
          <el-button
            v-if="showType==0"
            type="primary"
            plain
            style="margin-left:10px"
            @click="doUpdateStateByPrimaryKey"
          >保存</el-button>
        </div>
      </div>
      <div v-if="tabs==2&&from==1" class="tabs-btn">
        <el-radio-group v-model="edit" size="small">
          <el-radio-button :label="1">人才信息</el-radio-button>
          <el-radio-button :label="2">手动填写</el-radio-button>
        </el-radio-group>
        <span>模板更新时间：2019-09-09</span>
      </div>
      <!--简历信息-->
      <div class="tab-container resume" v-show="tabs==1">
        <div class="flex-box user">
          <div class="avatar">
            <img width="100" height="100" :src="Resume.image" alt>
          </div>
          <div>
            <div class="flex-box">
              <h3 style="font-size:24px;color:#333;">{{Resume.name}}</h3>
              <p class="workState">{{Resume.jobState}}</p>
            </div>
            <div class="flex-box base">
              <div class="flex-box">
                <img
                  src="../../assets/img/communication/age.png"
                  height="16px"
                  style="margin-right:5px;"
                >
                <p>{{Resume.age ? Resume.age + '岁': '---'}}</p>
              </div>
              <span style="padding:0 30px;">|</span>
              <div class="flex-box">
                <img
                  src="../../assets/img/communication/experience.png"
                  height="15px"
                  style="margin-right:5px;"
                >
                <p>{{Resume.workDay ? Resume.workDay + '年经验' : '---'}}</p>
              </div>
              <span style="padding:0 30px;">|</span>
              <div class="flex-box" style="height: 15px;">
                <img
                  src="../../assets/img/communication/address.png"
                  height="16px"
                  style="margin-right:5px;"
                >
                <p>{{Resume.city}}</p>
              </div>
              <span style="padding:0 30px;">|</span>
              <div class="flex-box" style="padding:10px 0;">
                <img
                  src="../../assets/img/communication/salary.png"
                  height="14px"
                  style="margin-right:5px;"
                >
                <span v-if="Resume.tax == 0">税前&nbsp;</span>
                <span v-if="Resume.tax == 1">税后&nbsp;</span>
                <p>{{Resume.salaryPerMonth ? Resume.salaryPerMonth + 'W' : '---'}}/{{Resume.monthCount ? Resume.monthCount + '年' : '---' }}</p>
              </div>
            </div>
            <div class="flex-box base2">
              <div class="flex-box">
                <img
                  src="../../assets/img/communication/tel.png"
                  height="16px"
                  style="margin-right:5px;"
                >
                <p>{{Resume.phone}}</p>
              </div>
              <span style="padding:0 30px;">|</span>
              <div class="flex-box" style="padding:10px 0;">
                <img
                  src="../../assets/img/communication/email.png"
                  height="16px"
                  style="margin-right:5px;"
                >
                <p>{{Resume.email}}</p>
              </div>
            </div>
          </div>
        </div>
        <!--期望职位-->
        <div class="job" style=" margin-top:30px;">
          <div class="flex-box" style="margin-bottom:20px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">期望职位</h3>
            <span class="margin-l sub-color">必填</span>
          </div>
          <div class="flex-box" v-for="item in Resume.hopeJob" style="padding:0 0 20px 0;">
            <div class="flex-box" style="padding:0 20px;">
              <img src="../../assets/img/communication/address.png" style="margin-right:5px;">
              <p>{{item.hopeCity}}</p>
            </div>
            <div class="flex-box" style="padding:0 20px;">
              <img src="../../assets/img/communication/practice.png" style="margin-right:5px;">
              <p>{{item.hopeLicenseStr}}</p>
            </div>
            <div class="flex-box" style="padding:0 20px;">
              <img src="../../assets/img/communication/enter_type.png" style="margin-right:5px;">
              <p>{{item.hopeCompanyTypeStr}}</p>
            </div>
            <div class="flex-box" style="padding:0 20px;">
              <img src="../../assets/img/communication/salary.png" style="margin-right:5px;">
              <span v-if="item.taxType == 0">税前&nbsp;</span>
              <span v-if="item.taxType == 1">税后&nbsp;</span>
              <p>{{item.salaryPerMonthLow}}-{{item.salaryPerMonthHigh}}/W {{item.yearNum}}年</p>
            </div>
          </div>
        </div>
        <!--工作经历-->
        <div class="work" style=" margin-top:30px;">
          <div class="flex-box" style="margin-bottom:20px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">工作经历</h3>
            <span class="margin-l sub-color">必填</span>
          </div>
          <div
            class="work-detail"
            v-for="item in Resume.jobExperiences"
            style="padding:0 0 20px 20px;"
          >
            <div class="flex-box">
              <h4
                style="margin-bottom: 10px;font-size: 16px;color: #555;font-weight: bold;"
              >{{item.companyName}}</h4>
              <span
                class="margin-l"
                style="margin-left: 30px;"
              >{{item.jobStartTime}}/{{item.jobEndTime}}</span>
            </div>
            <div class="flex-box" style="font-size: 14px;">
              <p>{{item.jobName}}</p>
              <span style="padding:0 30px;">|</span>
              <p>{{item.licenseTypeStr}}</p>
              <span style="padding:0 30px;">|</span>
              <p>{{item.companyTypeStr}}</p>
              <span style="padding:0 30px;">|</span>
              <p>{{item.workCity}}</p>
            </div>
            <div style="margin-top: 10px;font-size: 14px;" v-html="item.jobContent"></div>
          </div>
        </div>
        <!--项目经历-->
        <div class="work" style=" margin-top:30px;">
          <div class="flex-box" style="padding-bottom:20px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">项目经验</h3>
            <span class="margin-l sub-color">必填</span>
          </div>
          <div
            style="padding:0 0 20px 20px;"
            class="work-detail"
            v-for="item in Resume.projectExperience"
          >
            <div class="flex-box">
              <h4
                style="margin-bottom: 10px;font-size: 16px;color: #555;font-weight: bold;"
              >{{item.projectName}}</h4>
              <span
                class="margin-l"
                style="margin-left: 30px;"
              >{{item.projectStartTime}}/{{item.projectEndTime}}</span>
            </div>
            <div style="margin-top: 10px" v-html="item.projectContent"></div>
          </div>
        </div>
        <!--执业证书-->
        <div class="job" style=" margin-top:30px;">
          <div class="flex-box" style="margin-bottom:30px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">执业证书</h3>
            <span class="margin-l sub-color">必填</span>
          </div>
          <div class="flex-box" style="padding:0 0 20px 20px;" v-for="item in Resume.licenses">
            <div class="flex-box">
              <p
                style="margin-bottom: 10px;font-size: 16px;color: #555;font-weight: bold;"
              >{{item.licenseTypeStr}}</p>
            </div>
            <div class="flex-box">
              <i class="icon"></i>
              <p>{{item.licenseNum}}</p>
            </div>
          </div>
        </div>
        <!--教育经历-->
        <div class="work" style=" margin-top:30px;">
          <div class="flex-box" style="margin-bottom:20px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">教育经历</h3>
            <span class="margin-l sub-color">必填</span>
          </div>
          <div
            class="work-detail"
            v-for="item in Resume.educationExperiences"
            style="padding:0 0 20px 20px;"
          >
            <div class="flex-box" style="padding-bottom: 10px;line-height:16px;">
              <h4
                style="margin-bottom: 10px;font-size: 16px;color: #555;font-weight: bold;"
              >{{item.school}}</h4>
              <span class="margin-l" style="margin-left: 30px;">{{item.startTime}}/{{item.endTime}}</span>
            </div>
            <div class="flex-box" style="font-size: 14px;">
              <p style="margin-right: 10px">{{item.major}}</p>
              <span style="padding:0 30px;">|</span>
              <p style="margin-right: 10px">{{item.academicStr}}</p>
            </div>
          </div>
        </div>
        <!--职称-->
        <div class="job" style=" margin-top:30px;">
          <div class="flex-box" style="margin-bottom:20px">
            <span class="box-line"></span>
            <h3 style="color:#333;font-weight:blod;">职称</h3>
            <!-- <span class="margin-l sub-color">必填</span> -->
          </div>
          <div class="flex-box">
            <div class="flex-box resume-tag">
              <i class="icon"></i>
              <el-tag v-for="item in Resume.title">{{item}}</el-tag>
            </div>
          </div>
        </div>
      </div>
      <!--推荐报告-->
      <div class="tab-container report" v-show="tabs==2&&edit==1" v-if="from==1">
        <h3 class="text-center">候选人评估报告</h3>
        <h3>尊敬的企业用户您好：</h3>
        <ul class="content">
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
          <li>尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：尊敬的企业用户您好：</li>
        </ul>
        <h3>一、基本信息</h3>
        <ul class="flex-box info">
          <li>
            <p class="name">姓名：</p>
            <p class="val">xxx</p>
          </li>
          <li>
            <p class="name">姓名：</p>
            <p class="val">xxx</p>
          </li>
          <li>
            <p class="name">姓名：</p>
            <p class="val">xxx</p>
          </li>
          <li>
            <p class="name">姓名：</p>
            <p class="val">xxx</p>
          </li>
        </ul>
      </div>
      <div class="tab-container form" v-show="tabs==2&&edit==2" v-if="from==1">
        <h3>个人特征与管理风格倾向</h3>
        <p>该候选人最擅长于以下4个核心胜任力（不超过4个）</p>

        <el-form :model="form" ref="form1" class="content" label-width="100px">
          <el-form-item label="影响性">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="200"
              show-word-limit
              v-model="form.influence"
            ></el-input>
          </el-form-item>
          <el-form-item label="情感性">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="200"
              show-word-limit
              v-model="form.emotion"
            ></el-input>
          </el-form-item>
          <el-form-item label="独立性">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="200"
              show-word-limit
              v-model="form.independence"
            ></el-input>
          </el-form-item>
          <el-form-item label="自律性">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="200"
              show-word-limit
              v-model="form.selfDiscipline"
            ></el-input>
          </el-form-item>
          <!-- <el-form-item>
                    <el-button type="primary" @click="onSubmit(1)">保存</el-button>
                    <el-button>取消</el-button>
          </el-form-item>-->
        </el-form>
        <el-form :model="form" ref="form2" label-width="100px">
          <h3>优劣势分析</h3>
          <el-form-item label="优势">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.advantage"
            ></el-input>
          </el-form-item>
          <el-form-item label="劣势">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.disAdvantage"
            ></el-input>
          </el-form-item>
          <!-- <el-form-item>
                    <el-button type="primary" @click="onSubmit(2)">保存</el-button>
                    <el-button>取消</el-button>
          </el-form-item>-->
        </el-form>
        <el-form :model="form" ref="form3" label-width="100px">
          <h3>核心胜任力构成</h3>
          <p>该候选人最擅长于以下7个核心胜任力（不超过7个）</p>
          <el-form-item label="人际理解力">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="200"
              show-word-limit
              v-model="form.personalUnderstanding"
            ></el-input>
          </el-form-item>
          <el-form-item label="影响力">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.inflencePower"
            ></el-input>
          </el-form-item>
          <el-form-item label="沟通协调能力">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.communicationAbility"
            ></el-input>
          </el-form-item>
          <el-form-item label="团队领导能力">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.leaderShip"
            ></el-input>
          </el-form-item>
          <el-form-item label="责任感">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.responsibility"
            ></el-input>
          </el-form-item>
          <el-form-item label="分析思维">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.analytic"
            ></el-input>
          </el-form-item>
          <el-form-item label="计划组织能力">
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="500"
              show-word-limit
              v-model="form.planningAbility"
            ></el-input>
          </el-form-item>
          <!-- <el-form-item>
                    <el-button type="primary" @click="onSubmit(3)">保存</el-button>
                    <el-button>取消</el-button>
          </el-form-item>-->
        </el-form>
        <el-form :model="form" ref="form4" label-width="100px">
          <h3>推荐建议</h3>
          <el-form-item label>
            <el-input
              type="textarea"
              :rows="3"
              :disabled="showType==1"
              autosize
              maxlength="1000"
              show-word-limit
              v-model="form.recommenDations"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSubmit">保存</el-button>
            <el-button>取消</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Personnel',
  data() {
    return {
      from: undefined, //1 人才简历管理 2 企业申请沟通 3 人才确认入职 4 人才保证期
      inTheTime: '', //人才入职时间
      form: {},
      tabs: '1',
      edit: '1',
      options: [],
      value: undefined,
      radio: '',
      idSeed: false,
      isActive: false,
      resumeId: '', //投递表ID
      showType: 0, //0待沟通 1 已沟通
      companyInfo: [],
      ttphone: {},
      inputIntertion: [], //意向
      resumeHistoryId: '',
      Resume: {},
      hopeJob: [], //期望职位
      jobExperiences: [], //工作经历
      projectExperience: [], //项目经理
      licenses: [], //执业证书
      educationExperiences: [], //教育经历

      jrrIds: '',
      talentList: [],
      cType: 0
    }
  },
  methods: {
    updateEntryTime() {
      if (!this.inTheTime) {
        this.$message({ type: 'warning', message: '请选择时间' })
      } else {
        this.lAxios({
          method: 'post', //方法
          url: '/platform/entryTime.do', //路径，基础路径在main.js里面配置
          params: {
            //传参
            inTheTime: this.inTheTime,
            relationshipId: this.jrrIds
          }
        })
          .then(res => {
            //成功的回调函数
            console.log(res.data)
            if (res.data.status == 0) {
              this.$message({
                type: 'success',
                message: res.data.data
              })
              this.$router.push({ path: '/induction' })
            }
          })
          .catch(err => {
            //失败的回调函数
            // console.log(err);
          })
      }
    },
    doshowResume(item) {
      this.lAxios({
        method: 'post', //方法
        url: '/platform/getTalentManagement.do', //路径，基础路径在main.js里面配置
        params: {
          //传参
          id: this.resumeId
        }
      })
        .then(res => {
          //成功的回调函数
          this.companyInfo = res.data.data
          this.cid = res.data.data.cid
          this.jid = res.data.data.jid
          this.doshowTalentName()
        })
        .catch(err => {
          //失败的回调函数
          // console.log(err);
        })
    },
    doshowTalentName() {
      this.lAxios({
        method: 'post', //方法
        url: '/platform/getName.do', //路径，基础路径在main.js里面配置
        params: {
          // 传参
          cid: this.cid,
          jid: this.jid,
          showType: 1,
          state: this.showType
        }
      })
        .then(res => {
          //成功的回调函数
          this.options = res.data.data
          this.value = this.companyInfo.tid
          res.data.data.forEach(item => {
            this.ttphone[item.id] = item.phone
            this.inputIntertion[item.id] = item.inputIntertion
          })
        })
        .catch(err => {
          //失败的回调函数
          console.log(err)
        })
    },
    init() {
      this.from = this.$route.params.id
      this.idSeed = true
      this.resumeId = this.$route.query.id
      this.showType = this.$route.query.ct
      this.doshowResume()
    },
    onSubmit() {
      this._doReportTemplate()
    },
    doUpdateStateByPrimaryKey() {
      for (let item of this.options) {
        if (item.id == this.value) {
          console.log(item.jrrId)
          this._updateStateByPrimaryKey(item.jrrId)
          break
        }
      }
    },
    doSign(n) {
      //签订
      console.log(this.jrrId)
      if (n == this.showType) return
      let params = {
        applyComminication: n,
        relationshipId: this.jrrId
      }
      this.lAxios({
        method: 'post', //方法
        url: '/platform/updateStateByPrimaryKey.do', //路径，基础路径在main.js里面配置
        // data:params
        params
      })
        .then(res => {
          //成功的回调函数
          console.log(res)
        })
        .catch(err => {
          //失败的回调函数
          console.log(err)
        })
    },
    _doReportTemplate() {
      let rduser = JSON.parse(localStorage.getItem('userInfo')).id
      let params = {
        ...this.form,
        jrrId: this.jrrId,
        state: this.showType,
        talentId: this.value,
        companyId: this.resumeId,
        rduser
      }
      this.lAxios({
        method: 'post', //方法
        url: '/platform/ReportTemplate.do', //路径，基础路径在main.js里面配置
        // data:params
        params
      })
        .then(res => {
          //成功的回调函数
          console.log(res)
          if (res.data.status == 0) {
            this.$message({
              type: 'success',
              message: '操作成功'
            })
            this._init()
          }
        })
        .catch(err => {
          //失败的回调函数
          console.log(err)
        })
    },
    _updateStateByPrimaryKey(jrrId) {
      const params = {
        relationshipId: jrrId,
        inputIntertion: this.inputIntertion[this.value],
        reportState: 1,
        commonicationState: 1
      }
      this.lAxios({
        method: 'post', //方法
        url: '/platform/updateStateByPrimaryKey.do', //路径，基础路径在main.js里面配置
        params
      })
        .then(res => {
          //成功的回调函数
          this.$router.replace({
            name: this.$route.name,
            params: this.$route.params,
            query: {
              ...this.$route.query,
              ct: 1
            }
          })
          // console.log(res)
        })
        .catch(err => {
          //失败的回调函数
          console.log(err)
        })
    },
    _getReportTemplateInfo() {
      //未沟通简历
      let url = ''
      let params = {}
      console.log(this.showType)
      if (this.showType == 0) {
        params = {
          talentId: this.value
        }
        url = '/platform/getReportTemplateInfo.do'
      } else {
        params = {
          jrrId: this.jrrId
        }
        url = '/platform/getReportHistoryInfo.do'
      }
      this.lAxios({
        method: 'post', //方法
        url, //路径，基础路径在main.js里面配置
        params
      })
        .then(res => {
          //成功的回调函数
          res = res.data.data
          if (res) {
            this.form = res
          } else {
            this.form = {}
          }
        })
        .catch(err => {
          this.form = {}
          //失败的回调函数
          console.log(err)
        })
    },
    ResumeInfor() {
      this.resumeHistoryId = localStorage.getItem('resumeHistoryId')
      console.log(this.resumeHistoryId)
      this.lAxios({
        method: 'post',
        url: '/platform/selectHistoryResume.do',
        params: {
          resumeHistoryId: this.resumeHistoryId
        }
      }).then(res => {
        console.log(res.data.data)
        this.Resume = res.data.data
        this.hopeJob = this.Resume.hopeJob
        this.jobExperiences = this.Resume.jobExperiences
        this.projectExperience = this.Resume.projectExperience //还没有数据 项目经历
        this.licenses = this.Resume.licenses
        this.educationExperiences = this.Resume.educationExperiences
        console.log(this.educationExperiences[0])
      })
    },
    initData() {
      this.lAxios({
        method: 'post',
        url: '/platform/getTalentManagement.do',
        params: {
          jrrId: this.jrrIds
        }
      }).then(res => {
        this.companyInfo = res.data.data
        this.Resume = res.data.data.resumeDTO
        this.Resume.title = res.data.data.resumeDTO.title.split(',')
        console.log('jrrId', this.companyInfo)
      })
    },
    getTalentList() {
      this.lAxios({
        method: 'post', //方法
        url: '/platform/getTalentName.do', //路径，基础路径在main.js里面配置
        params: {
          //传参
          comId: this.$route.query.comId,
          jobId: this.$route.query.jobId,
          state: this.$route.query.state,
          showType: this.$route.query.showType
        }
      }).then(res => {
        //成功的回调函数
        console.log('talent', res.data.data)
        this.talentList = res.data.data || []
        this.formateTalentList()
      })
    },
    formateTalentList() {
      this.talentList.forEach(res => {
        this.options.push({ id: res.jrrID, name: res.name })
      })
    },
    toCommunication(index) {
      if (index == 0) {
        this.$toComm.toCompany(this, this.companyInfo.cid)
      } else {
        this.$toComm.toTalent(
          this,
          this.companyInfo.cid,
          this.companyInfo.jid,
          this.companyInfo.tid
        )
      }
    }
  },
  computed: {
    jrrId() {
      let ret = ''
      this.options.forEach(item => {
        if (item.id == this.value) {
          ret = item.jrrId
        }
      })
      return ret
    },
    state() {
      let ret = ''
      this.options.forEach(item => {
        if (item.id == this.value) {
          ret = item.jrrId
        }
      })
      return ret
    }
  },
  watch: {
    value() {
      if (this.from == 1) {
        this._getReportTemplateInfo()
      }
    },
    $route() {
      this.init()
    }
  },
  created() {
    // this.init()
    // this.ResumeInfor()
    this.cType = this.$route.query.state
    if (this.$route.query.jrrId) {
      this.jrrIds = this.$route.query.jrrId
      console.log('jrrId', this.jrrId)
    }
    this.initData()
    this.getTalentList()
  }
}
</script>
<style lang='scss'>
/* .el-radio__input.is-disabled .el-radio__inner
    ,.el-radio__input.is-disabled.is-checked .el-radio__inner {
        background-color: #fff;
        border-color: #409EFF!important;
    }
    .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
        background-color: #C0C4CC;
    } */
.el-radio__input.is-disabled + span.el-radio__label {
  color: #606266;
  cursor: not-allowed;
}
.el-radio__input.is-disabled .el-radio__inner,
.el-radio__input.is-disabled.is-checked .el-radio__inner {
}
.el-radio__input.is-disabled.is-checked .el-radio__inner {
  background-color: #409eff;
  border-color: #409eff;
}
.el-radio__input.is-disabled.is-checked .el-radio__inner::after {
  background-color: #fff;
}
.el-textarea.is-disabled .el-textarea__inner {
  background-color: #fff;
  border-color: #dcdfe6;
  color: #606266;
  cursor: not-allowed;
}
.top-radio-button {
  .el-radio-button__inner {
    width: 125px;
    height: 50px;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
  }
}
.resume-tag {
  .el-tag {
    width: auto;
    padding: 7px 20px;
    line-height: 15px;
    border: none;
    border-radius: 2px;
    background: #f3f3f7;
    color: #666;
    font-size: 13px;
    margin: 0 10px 10px 0;
  }
}
</style>

<style lang="scss" scoped>
.shink0 {
  flex-shrink: 0;
  padding: 10px 30px;
  border-bottom: 1px solid #ccc;
}
.inputIntertion {
  display: flex;
  align-items: center;
}
.Personnel {
  box-sizing: border-box;
  width: 100%;
  height: 99%;
  overflow-y: auto;
  // border: 1px solid #797979;
  position: relative;
  padding: 1% 0 0 1%;
  display: flex;
  flex-direction: column;
  // margin-left: 10px;
}

.sbmt {
  height: 40px;
  width: 100px;
  position: absolute;
  top: 13%;
  left: 86%;
}
.title {
  height: 33px;
  line-height: 33px;
}
.lPersonTop {
  padding-left: 30px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background-color: #fff;
  position: relative;
  .btn-wrap {
    position: absolute;
    right: 20px;
    top: 44px;
  }
}

.Personnel > button {
  width: 70px;
  height: 29px;
  border: 1px solid #797979;
  background: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#dedede));
  position: absolute;
  top: 60px;
  right: 15px;
}
.tabs-btn {
  margin: 10px;
}
.lPersonTop_box {
  display: flex;
  align-items: center;
  width: 500px;
}

.lPersonTop_box > div {
  font-size: 14px;
  margin: 10px 10px;
}

.lPersonTop_box > span:nth-child(1) {
  font-weight: bold;
}

.lPerson > button {
  width: 44px;
  height: 28px;
  border: 1px solid #797979;
  background-color: white;
  border-radius: 4px;
  // margin-left: 10px;
}

.lselect {
  width: 161px;
}

.auditMain > button {
  width: 125px;
  height: 37px;
  margin-top: 20px;
  margin-bottom: 20px;
  border: 1px solid #797979;
  /*background-color: white;*/
}

.auditMain > button:nth-child(1) {
  margin-right: 10px;
  margin-left: 2%;
}

.active {
  background-color: #199ed8;
  color: #333;
}
.tab-container {
  flex-grow: 1;
  overflow-y: auto;
  background: #fff;
  padding: 70px 40px;
}
/*---------------简历----------------------*/
.resume {
  font-size: 14px;
  color: #666;
  .user {
    .avatar {
      margin-right: 20px;
    }
    .base,
    .base2 {
      > div:not(:last-child) {
        line-height: 1;
        padding: 10px 0;
      }
    }
  }
}
.report {
  .content {
    padding: 0 30px;
    .info {
      .name {
        width: 100px;
      }
    }
  }
}
.workState {
  width: 144px;
  height: 24px;
  background-color: #4ab0cf;
  border-radius: 10px 10px 10px 0px;
  color: white;
  line-height: 24px;
  text-align: center;
  margin-left: 10px;
  font-size: 14px;
}
/*-------------------推荐报告-人才信息-----------------------*/
.language {
  width: 691px;
  height: 230px;
  color: #666;
  line-height: 25px;
  text-align: left;
  font-size: 14px;
  text-indent: 2em;
  margin-left: 48px;
  margin-bottom: 29px;
}
.basic {
  text-align: left;
}

.titleFont {
  color: #333;
  font-size: 18px;
  font-weight: bold;
}

.basicFont {
  margin-left: 48px;
}

.fontT {
  color: #666;
  font-size: 14px;
}

.fontLeft {
  margin-left: 90px;
}

.fontLeft1 {
  margin-left: 59px;
}

.marginT {
  margin-top: 29px;
}

.marginT1 {
  margin-top: 12px;
}

.marginB {
  margin-bottom: 17px;
}

.marginL {
  margin-left: 17%;
}

.fontSize {
  font-size: 16px;
  font-weight: bold;
}

.marginR {
  margin-right: 51px;
}

.marginR1 {
  margin-right: 30px;
}
.base {
  display: flex;
  flex-direction: row;
}

.empty {
  width: 2px;
  height: 15px;
  background-color: #f09338;
  margin-left: 28px;
  margin-top: 4px;
}

.empty1 {
  width: 2px;
  height: 15px;
  background-color: #666;
  margin-left: 15px;
  margin-right: 15px;
  margin-top: 4px;
}

.marginR {
  margin-right: 10px;
}

.reportContent {
  width: 100%;
  /*height: 798px;*/
  border-top: 1px solid #dcdcdc;
  margin-top: 17px;
  color: #333;
}

.font {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-top: 31px;
  margin-bottom: 29px;
}

.bergin {
  text-align: left;
  margin-left: 48px;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 19px;
}
.sub-color {
  color: #dd3a31;
}
.second-button {
  width: 125px;
  height: 50px;
  background: #eaf2ff;
  border: 1px solid #3377ff;
  color: #3377ff;
  font-size: 16px;
  // &:hover{
  //   background: #409EFF;
  //   color: #fff;
  // }
}
.box-line {
  display: inline-block;
  width: 3px;
  height: 16px;
  background: #f09338;
  margin-right: 6px;
}
</style>
